﻿#pragma once

#include "plugin1_global.h"
#include "../Interface/interface1.h"    //引入接口类
#include "ui_plugin1.h"                 //引入自动生成的ui文件

#pragma execution_character_set("utf-8")

/**
* @brief
* 插件类其实就是接口类的子类，用于实现接口类
* 格式：
* 1、继承QObject(带ui的继承QWidget)
* 2、继承接口类
*/

class PLUGIN1_EXPORT Plugin1
    //:public QObject
    :public QWidget
    , public Interface1
{
    //宏3联
    Q_OBJECT
    Q_PLUGIN_METADATA(IID Interface1_IID)  //描述插件元数据
    Q_INTERFACES(Interface1)               //本类要实现的接口
public:
    Plugin1();
    ~Plugin1();
    //实现的虚函数
    virtual QString title() override;   //插件信息
    virtual QString version() override;
    virtual void processImage(const cv::Mat& inputImg, cv::Mat& outputImg) override;    

private:
    Ui::Plugin1Ui ui;   
};